package club.justwill.single.Controller;

import club.justwill.single.model.SessionState;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;

/**
 * Created by xiangnan on 15-12-24.
 */
public abstract class BaseController implements Serializable {
    //url
    public static final String URL_PREFIX_USER = "/user";
    public static final String URL_USER_LOGIN = URL_PREFIX_USER + "/login";
    public static final String URL_USER_LINK_WEIXIN = URL_PREFIX_USER + "/linkWeiXin/{code}";
    public static final String URL_USER_ADMIN_LOGIN = URL_PREFIX_USER + "/admin/login";
    public static final String URL_USER_LOGOUT = URL_PREFIX_USER + "/logout";
    public static final String URL_USER_AUTHCODE = URL_PREFIX_USER + "/getAuthCode/{phone}";
    public static final String URL_USER_GET_BY_ID = URL_PREFIX_USER + "/getById/{userId}";
    public static final String URL_USERS = URL_PREFIX_USER + "/get";

    public static final String URL_USER_SIGNUP = URL_PREFIX_USER + "/signup";
    public static final String URL_USER_EX_LOGIN = URL_PREFIX_USER + "/exLogIn";
    public static final String URL_USE_PASSWORD_RESET = URL_PREFIX_USER + "/password/reset";
    public static final String URL_USE_PASSWORD_CHANGE = URL_PREFIX_USER + "/password/change";
    public static final String URL_USER_SAVE_ALIPAY_NUMBER = URL_PREFIX_USER + "/save/alipayNumber/{alipayNumber}";
    public static final String URL_GET_ADDRESS = URL_PREFIX_USER + "/address/get";
    public static final String URL_DELETE_ADDRESS = URL_PREFIX_USER + "/address/delete/{addressId}";
    public static final String URL_UPDATE_ADDRESS = URL_PREFIX_USER + "/address/update";
    public static final String URL_ADD_ADDRESS = URL_PREFIX_USER + "/address/add";
    public static final String URL_USER_PROJECT_FOLLOW = URL_PREFIX_USER + "/project/follow/{projectId}";
    public static final String URL_USER_PROJECT_UNFOLLOW = URL_PREFIX_USER + "/project/unfollow/{projectId}";
    public static final String URL_USER_FOLLOWED_PROJECT_SEARCH = URL_PREFIX_USER + "/project/searchFollowed";
    public static final String URL_USER_SUPPORTED_PROJECT_SEARCH = URL_PREFIX_USER + "/project/searchSupported";
    public static final String URL_USER_SEARCH = URL_PREFIX_USER+"/search";
    public static final String URL_USER_UPLOAD_HEADICON = URL_PREFIX_USER + "/uploadHeadIcon";
    public static final String URL_USER_SET_SECURITY_CODE = URL_PREFIX_USER + "/setSecurityCode";
    public static final String URL_USER_COLLET_ADVICE = URL_PREFIX_USER + "/collectAdvice";
    public static final String URL_USER_SEARCH_ADVICE = URL_PREFIX_USER + "/searchAdvice";

    //order
    public static final String URL_ORDER = "order";
    public static final String URL_ORDER_CREATE = URL_ORDER +"/create";
    public static final String URL_ORDER_GET = URL_ORDER +"/get";
    public static final String URL_ORDER_PAY = URL_ORDER + "/pay";
    public static final String URL_ORDER_PAY_ACTIVITY = URL_ORDER +"/pay/activity/{orderId}";
    public static final String URL_ORDER_CONFIRM_RECEIPT = URL_ORDER + "/confirmReceipt/{orderId}";
    public static final String URL_ORDER_DELETE = URL_ORDER + "/delete/{orderId}";
    public static final String URL_ORDER_CONFIRM_RECEIPT_BY_SELLER = URL_ORDER + "/seller/confirmReceipt/{serialNumber}";
    public static final String URL_ORDER_GET_NOT_PAID = URL_ORDER + "/getNotPaid";



    public static final String URL_USER_INVFRED = URL_PREFIX_USER + "/inviteFriend";

    //projects
    public static final String URL_PREFIX_PROJECT = "/project";
    public static final String URL_PROJECT_SEARCH = URL_PREFIX_PROJECT + "/search";
    public static final String URL_PROJECT_CREATE = URL_PREFIX_PROJECT + "/create";
    public static final String URL_PROJECT_UPDATE = URL_PREFIX_PROJECT + "/update/{projectId}";

    public static final String URL_ADD_AGREEMENT = URL_PREFIX_PROJECT + "/agreement/add";
    public static final String URL_ADD_SKU = URL_PREFIX_PROJECT + "/sku/add";
    public static final String URL_UPDATE_SKU = URL_PREFIX_PROJECT + "/sku/update";
    public static final String URL_ADMIN_PROJECT_INTRODUCE_CREATE = "/project/createIntroduceCover/{introduceId}";
    public static final String URL_PROJECT_ORDERS_SEARCH = URL_PREFIX_PROJECT + "/orders/search/{projectId}";
    public static final String URL_PROJECT_SKUS_SEARCH = URL_PREFIX_PROJECT + "/skus/search/{projectId}";
    public static final String URL_PROJECT_SKU_SUPPORT_SEARCH = URL_PREFIX_PROJECT + "/skuSupport/search/{projectId}";
    public static final String URL_PROJECT_SUPPORT_INFO = URL_PREFIX_PROJECT + "/supportInfo/{projectId}";
    public static final String URL_PROJECT_COMMENTS_SEARCH = URL_PREFIX_PROJECT + "/comments/search/{projectId}";
    public static final String URL_PROJECT_DISCUSS = URL_PREFIX_PROJECT + "/comments/discuss"; //创建评论
    public static final String URL_PROJECT_REPLY = URL_PREFIX_PROJECT + "/comments/reply"; //回复评论
    public static final String URL_PROJECT_GET = URL_PREFIX_PROJECT + "/get/{projectId}";
    public static final String URL_PROJECT_GET_BY_TAG = URL_PREFIX_PROJECT + "/getByTag";
    public static final String URL_REFUND = URL_PREFIX_PROJECT + "/refund";
    public static final String URL_REFUND_NOTIFY = URL_PREFIX_PROJECT + "/refund/notify";
    public static final String URL_PROJECT_GET_BY_STATUS_TAG = URL_PREFIX_PROJECT + "/getByStatusAndTag";
    public static final String URL_PROJECT_GET_PROJECT_HITS = URL_PREFIX_PROJECT + "/getProjectHits/{projectId}";
    public static final String URL_PROJECT_AA_PROJECT_HITS = URL_PREFIX_PROJECT + "/addProjectHits/{projectId}";
    public static final String URL_PREFIX_MODEL = "/model";
    public static final String URL_MODEL_PROJECT_GET = URL_PREFIX_MODEL + "/getProject";
    //projectIntroduce

    public static final String URL_PREFIX_PROJECT_INTRDUCE = URL_PREFIX_PROJECT+ "/introduce";
    public static final String URL_PROJECT_INTRODUCE_CREATE = URL_PREFIX_PROJECT_INTRDUCE + "/create";
    public static final String URL_PROJECT_INTRODUCE_UPDATE = URL_PREFIX_PROJECT_INTRDUCE + "/update";
    public static final String URL_PROJECT_INTRODUCE_SEARCH = URL_PREFIX_PROJECT_INTRDUCE + "/search";
    public static final String URL_PROJECT_COVER_SAVE = "/admin/project/createCover/{projectId}";
    //huifu
    public static final String URL_HUIFU = "/huifu";
    public static final String URL_HUIFU_REGISTER = URL_HUIFU+"/register";
    public static final String URL_PROJECT_SUPPORT_RETURN_SEARCH = URL_PREFIX_PROJECT_INTRDUCE + "/supportReturn/search/{projectId}";

    //skus
    public static final String URL_SKUS_CREATE_COVER = "/skus/createCover/{skuId}";

    //activity
    public static final String URL_PREFIX_ACTIVITY = "/activity";
    public static final String URL_JOIN_ACTIVITY = URL_PREFIX_ACTIVITY + "/join/{activityId}";
    public static final String URL_CREATE_ACTIVITY = URL_PREFIX_ACTIVITY + "/create";
    public static final String URL_GET_ACTIVITY = URL_PREFIX_ACTIVITY + "/get";
    public static final String URL_SEARCH_ACTIVITY = URL_PREFIX_ACTIVITY + "/search";
    public static final String URL_ACTIVITY_COVER_UPLOAD = URL_PREFIX_ACTIVITY + "/uploadCover/{activityId}";

    //audit
    public static final String AUDIT ="/audit";
    public static final String URL_ADUIT_PROJECT =AUDIT+ "/project";

    public static final String URL_LOGISTIC_ORDER = URL_ORDER+"/logistic/save";

    //payfor
    public static final String URL_PREFIX_PAY = "/pay";
    public static final String URL_PAY_WEICHAT = URL_PREFIX_PAY + "/weichat/{orderId}";
    public static final String URL_PAY_REFRESH = URL_PREFIX_PAY + "/notify";
    public static final String URL_PAY_RETURN = URL_PREFIX_PAY + "/return";
    public static final String URL_PAY_APP = URL_PREFIX_PAY + "/app/{orderId}";


    @Autowired
    protected SessionState sessionState;
}
